package exception;

public class TestPersonException {
    public static void main(String[] args) {
        Person person = new Person();
       /* try {
            person.setAge(1000);
        } catch (Exception e) {
            System.out.println("补救措施，年龄赋值 不对");

        }*/
        try {
            person.setAge(1000);
        } catch (IllegalAgeException e) {
            System.out.println(e.getMessage());
        }
        System.out.println("程序执行");
    }
}
